package com.thunisoft.netty.custom;

/**
 *   协议头部，放置一些Meta信息
 * @title CostomHeader.java
 * @package com.thunisoft.netty.custom
 * @projectName spring.boot
 * @author yzj 
 * @date 2019年10月8日 下午4:52:02
 */
public class CustomHeader {
	
	/**
	 * 版本号
	 */
	private  int version;
	/**
	 * 消息内容长度
	 */
	private int contentLength;
	/**
	 * 服务名称
	 */
	private String sessionId;
	
	
	public CustomHeader(int version, int contentLength, String sessionId) {
		super();
		this.version = version;
		this.contentLength = contentLength;
		this.sessionId = sessionId;
	}


	/**
	 * @return the version
	 */
	public int getVersion() {
		return version;
	}


	/**
	 * @param version the version to set
	 */
	public void setVersion(int version) {
		this.version = version;
	}


	/**
	 * @return the contentLength
	 */
	public int getContentLength() {
		return contentLength;
	}


	/**
	 * @param contentLength the contentLength to set
	 */
	public void setContentLength(int contentLength) {
		this.contentLength = contentLength;
	}


	/**
	 * @return the sessionId
	 */
	public String getSessionId() {
		return sessionId;
	}


	/**
	 * @param sessionId the sessionId to set
	 */
	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}


	@Override
	public String toString() {
		return "CustomHeader [version=" + version + ", contentLength=" + contentLength + ", sessionId=" + sessionId
				+ "]";
	}

}
